package com.zhixing.user.client;

import com.zhixing.common.domain.vo.DriverInfoVO;
import com.zhixing.common.utils.Res;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("user-service")
public interface UserClient {

    /**
     * 获取司机信息
     * @param driverId 司机id
     * @return DriverInfoVO 司机信息
     */
    @GetMapping("/driver/driverInfo/{driverId}")
    Res<DriverInfoVO> getDriverInfo(@PathVariable Integer driverId);

    /**
     * 根据司机id获取用户id
     * @param driverId 司机id
     * @return userId 用户id
     */
    @GetMapping("/driver/userId/{driverId}")
    Res<Integer> getUserIdByDriverId(@PathVariable Integer driverId);
}
